<!DOCTYPE html>
<html lang="zh-CN">
  	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title></title>
		
		<link rel="stylesheet" href="/css/bootstrap.min.css" />
		<link rel="stylesheet" href="/wangeditor/dist/css/wangEditor.min.css" />
		<link rel="stylesheet" href="/css/header.css" />
		<link rel="stylesheet" href="/css/newsPublish.css" />
		<link rel="stylesheet" href="/css/sweetalert.css" />
	</head>
	
	<body>
		
		<%- include header %>
			
		<div class="container">
			<div class="page-header">
			  <h1><%= classify %>新闻发布：</h1>
			</div>
			
			<form class="form-horizontal">
				<div class="form-group">
				    <label for="title" class="col-sm-2 control-label">标题</label>
				    <div class="col-sm-10">
				        <input type="text" name="title" class="form-control" id="title" placeholder="请输入主标题" value="<%= news.title %>">
				    </div>
				</div>
				<div class="form-group">
				    <label for="smallTitle" class="col-sm-2 control-label">副标题</label>
				    <div class="col-sm-10">
				        <input type="text" name="smallTitle" class="form-control" id="smallTitle" placeholder="请输入副标题" value="<%= news.smallTitle %>">
				    </div>
				</div>
				<div class="form-group">
				    <label for="summary" class="col-sm-2 control-label">摘要</label>
				    <div class="col-sm-10">
				    	<textarea  class="form-control" name="summary" id="summary" placeholder="请输入摘要……" rows="3" ><%= news.summary %></textarea>
				    </div>
				</div>
				<div class="form-group">
				    <label for="smallPicture" class="col-sm-2 control-label">缩略图</label>
				    <div class="col-sm-10">
					    <input type="file" name="smallPicture" id="smallPicture" data-oldSmallPicture="<%= news.smallPicture %>">
					    <p class="help-block">如果你有特殊想展示的图片，请上传一张缩略图！</p>
				    </div>
				</div>
				<div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">新闻具体内容</label>
				    <div class="col-sm-10">
				        <div id="newsContent">
				        	<% if(news == []) { %>
				        		<p>请输入新闻文章内容……</p>
				        	<% }else { %>
				        		<%- news.content %>
				        	<% } %>
				        </div>
				    </div>
				</div>
				<div class="form-group">
				    <div class="col-sm-offset-2 col-sm-10">
				        <button type="submit" class="btn btn-default" id="send" data-value="<%= classify %>" data-newsId="<%= newsId %>">发布</button>
				    </div>
				</div>
			</form>
		</div>
	
	
		
		<script type="text/javascript" src="/js/jquery-3.1.1.min.js" ></script>
		<script type="text/javascript" src="/js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="/wangeditor/dist/js/wangEditor.min.js" ></script>
		<script type="text/javascript" src="/js/sweetalert.min.js" ></script>
		<script type="text/javascript" src="/js/newsPublish.js" ></script>
	</body>
</html>
